package com.itheima.day13.thread_Chuangjian.callable;

import java.util.concurrent.Callable;

public class Mycallable implements Callable {
    private int a;
    public Mycallable(int a){
        this.a = a;
    }
    @Override
    public String call() throws Exception {
        int sum = 0;
        for (int i = 0; i < a; i++) {
            sum += i;
        }
        return "结果为"+sum;
    }
}
